package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;

import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputPattern;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.en.AccountType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;

/**
 * <pre>
 * 转账表
 * </pre>
 * @author linriqing
 * @version 1.0, 2010-7-19
 */
@Entity
public class Transfer extends AbstractAssign18IdEntity
{
	/**
	 * <pre>
	 * 转账处理状态
	 * </pre>
	 */
	public static enum TransferStatus
	{
		/**
		 * 处理中
		 */
		DEALING("处理中"),
		/**
		 * 处理失败
		 */
		FAILED("处理失败"),
		/**
		 * 处理成功
		 */
		SUCCESS("处理成功");

		private String text;

		TransferStatus(String text)
		{
			this.text = text;
		}

		public String getText()
		{
			return text;
		}

		public void setText(String text)
		{
			this.text = text;
		}
	}

	private static final long serialVersionUID = -9008803354355283559L;

	@HtmlInput(label = "出账账户类型", type = HtmlInputType.TEXT, index = 1, nullable = true, labelProperty = "text")
	private AccountType outType;

	@HtmlInput(label = "出账用户ID", type = HtmlInputType.TEXT, index = 2, nullable = true)
	private Long outUserId;
	
	@HtmlInput(label = "出账托管ID", type = HtmlInputType.TEXT, index = 2, nullable = true)
	private String outTrustAccountId;

	@HtmlInput(label = "出账子账户ID", type = HtmlInputType.TEXT, index = 3, nullable = true)
	private String outSubAccountId;

	@HtmlInput(label = "入账账户类型", type = HtmlInputType.TEXT, index = 4, nullable = true, labelProperty = "text")
	private AccountType inType;

	@HtmlInput(label = "入账用户ID", type = HtmlInputType.TEXT, index = 2, nullable = true)
	private Long inUserId;
	@HtmlInput(label = "入账托管ID", type = HtmlInputType.TEXT, index = 5, nullable = true)
	private String inTrustAccountId;

	@HtmlInput(label = "入账子账户ID", type = HtmlInputType.TEXT, index = 6, nullable = true)
	private String inSubAccountId;

	@HtmlInput(label = "转账金额(分)", type = HtmlInputType.TEXT, index = 7, nullable = true)
	private Long money;

	@Column(length = 50)
	@HtmlInput(label = " 订单号", type = HtmlInputType.TEXT, index = 8, nullable = true)
	private String orderId;

	@HtmlInput(label = "转账处理状态", type = HtmlInputType.TEXT, index = 9, nullable = true, labelProperty = "text")
	private TransferStatus status;

	/**
	 * 更新时间
	 */
	@HtmlInput(label = "最后修改日期", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true,index = 18)
	private Date updateTime;

	/**
	 * 创建时间
	 */
	@HtmlInput(label = "创建时间", type = HtmlInputType.TEXT, pattern = HtmlInputPattern.DATETIME, format = "yyyy-MM-dd HH:mm", nullable = true,index = 19)
	private Date createTime;
	
	@Column(length = 150)
	@HtmlInput(label = "描述", type = HtmlInputType.TEXTAREA, index = 100, nullable = true)
	private String remark;

	public AccountType getOutType()
	{
		return outType;
	}

	public void setOutType(AccountType outType)
	{
		this.outType = outType;
	}

	public String getOutTrustAccountId()
	{
		return outTrustAccountId;
	}

	public void setOutTrustAccountId(String outTrustAccountId)
	{
		this.outTrustAccountId = outTrustAccountId;
	}

	public String getOutSubAccountId()
	{
		return outSubAccountId;
	}

	public void setOutSubAccountId(String outSubAccountId)
	{
		this.outSubAccountId = outSubAccountId;
	}

	public AccountType getInType()
	{
		return inType;
	}

	public void setInType(AccountType inType)
	{
		this.inType = inType;
	}

	public String getInTrustAccountId()
	{
		return inTrustAccountId;
	}

	public void setInTrustAccountId(String inTrustAccountId)
	{
		this.inTrustAccountId = inTrustAccountId;
	}

	public String getInSubAccountId()
	{
		return inSubAccountId;
	}

	public void setInSubAccountId(String inSubAccountId)
	{
		this.inSubAccountId = inSubAccountId;
	}

	public Long getMoney()
	{
		return money;
	}

	public void setMoney(Long money)
	{
		this.money = money;
	}

	public String getOrderId()
	{
		return orderId;
	}

	public void setOrderId(String orderId)
	{
		this.orderId = orderId;
	}

	public TransferStatus getStatus()
	{
		return status;
	}

	public void setStatus(TransferStatus status)
	{
		this.status = status;
	}

	public Date getCreateTime()
	{
		return createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

	public Date getUpdateTime()
	{
		return updateTime;
	}

	public void setUpdateTime(Date updateTime)
	{
		this.updateTime = updateTime;
	}

	public String getRemark()
	{
		return remark;
	}

	public void setRemark(String remark)
	{
		this.remark = remark;
	}

	public Long getOutUserId()
	{
		return outUserId;
	}

	public void setOutUserId(Long outUserId)
	{
		this.outUserId = outUserId;
	}

	public Long getInUserId()
	{
		return inUserId;
	}

	public void setInUserId(Long inUserId)
	{
		this.inUserId = inUserId;
	}

}